//指定某个特定目录进行打包
const execa = require("execa");
const target = 'compiler-dom'

build(target);

async function build(target){
  console.log('build target:',target)
  //开启子进程用rollup进行打包
  await execa(
    'rollup',
    ['-wc','--environment',`TARGET:${target}`], // rollup -c --environment TARGET:shared
    {stdio:'inherit'} //子进程打包的信息共享给父进程
  );
}
